package edu.utility.Gui;

import java.awt.Dimension;
import java.awt.Toolkit;

import javax.swing.JFrame;

import edu.utility.Entities.Entities;

public class MyFrame extends JFrame{
	public static void main(String[] args){
		new MyFrame();
		}
	private LogInPanel logInPanel;
	private SettingPane controlpanel;
	public MyFrame(){
		setUpGui();
	}
	public void setUpGui(){
		Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
		this.setLocation((int)(dim.getSize().getWidth()/2) - 120, (int)(dim.getSize().getHeight()/2)-75);
		this.setLayout(null);
		this.setDefaultCloseOperation(this.EXIT_ON_CLOSE);
		showLogIn();
		this.setVisible(true);
	}
	public void showLogIn(){
		this.setSize(400, 200);
		this.setTitle("Log in");
		logInPanel = new LogInPanel(this);
		this.add(logInPanel);
		this.repaint();

	}
	
	public void showControls(){
		this.setSize(300, 360);
		this.remove(logInPanel);
		this.setTitle("Controls");
		controlpanel = new SettingPane(this);
		this.add(controlpanel);
	}
	public void removeControls(){
		this.remove(controlpanel);
	}
}
